<?php

namespace app\admin\model;


use think\Model;

/**
 * Notes:
 * PROJECT_NAME : ERP v1.8 重构erp
 * User: 夏鱼儿<397072174@qq.com>
 * Date: 2024/4/3
 * Time: 10:04
 */
class CompanyOrderLog extends Base
{

    protected $append = ['order_status_text'];
    protected $hidden = ['delete_time', 'update_time','status'];

    /**
     * 添加订单日志
     * @param int $order_id 订单ID
     * @param int $order_status 订单状态
     * @param string $remark 订单备注
     * @return CompanyOrderLog|Model
     */
    public function add(int $order_id, int $order_status, string $remark = ''): CompanyOrderLog|Model
    {
        return self::create(['company_order_id' => $order_id, 'order_status' => $order_status, 'remark' => $remark]);
    }
}